﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DE.Interfaces;
using System.Runtime.Serialization;

namespace DE.Class
{
    /// <summary>
    /// Base class for representing the DE Data
    /// </summary>
    [DataContract]
    public class BaseEntityData : IBaseEntityData
    {
        /// <summary>
        /// Default C'tor
        /// </summary>
        public BaseEntityData()
        {
        }

        private string m_comment;
        private string m_name;
        private DateTime m_creationTime;
        private DateTime m_updateTime;

        /// <summary>
        /// Holds the entity name
        /// </summary>
        [DataMember]
        public string Name
        {
            get
            {
                return m_name;
            }
            set
            {
                m_name = value;
            }
        }

        /// <summary>
        /// Holds the DE Comment
        /// </summary>
        [DataMember]
        public string Comment
        {
            get
            {
                return m_comment;
            }
            set
            {
                m_comment = value;
            }
        }

        /// <summary>
        /// Holds the entity creation time
        /// There is no set because the set will be in the DALHelper directly to the DB. The user should not alter this field
        /// </summary>
        [DataMember]
        public DateTime CreationTime
        {
            get
            {
                return m_creationTime;
            }
            set
            {
                m_creationTime = value;
            }
        }

        /// <summary>
        /// Holds the Entity update time
        /// There is no set because the set will be in the DALHelper directly to the DB. The user should not alter this field
        /// </summary>
        [DataMember]
        public DateTime UpdateTime
        {
            get
            {
                return m_updateTime;
            }
            set
            {
                m_updateTime = value;
            }
        }
    }
}
